import request from '@/utils/request'

// 查询产线列表
export function listProdline(query) {
  return request({
    url: '/base/prodline/list',
    method: 'get',
    params: query
  })
}

// 查询产线详细
export function getProdline(equipmentId) {
  return request({
    url: '/base/prodline/' + equipmentId,
    method: 'get'
  })
}

// 新增产线
export function addProdline(data) {
  return request({
    url: '/base/prodline',
    method: 'post',
    data: data
  })
}

// 修改产线
export function updateProdline(data) {
  return request({
    url: '/base/prodline',
    method: 'put',
    data: data
  })
}

// 删除产线
export function delProdline(equipmentId) {
  return request({
    url: '/base/prodline/' + equipmentId,
    method: 'delete'
  })
}

// 导出产线
export function exportProdline(query) {
  return request({
    url: '/base/prodline/export',
    method: 'get',
    params: query
  })
}

// 查询属性为车间的车间
export function listdept(query) {
  return request({
    url: '/base/prodline/deptlist',
    method: 'get',
    params: query
  })
}

//查询是否有重复产线代码


export function selectProdlinecode(prodlineCode) {
  return request({
    url: '/base/prodline/selectprodlineCode/'+prodlineCode,
    method: 'get',
  
  })
}
